home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3118 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  928 b 

  1. Path: EU.net!sun4nl!ittpub!ittpub!nntp
  2. Newsgroups: comp.lang.c++
  3. Subject: Re: About inline function
  4. Message-ID: <1996Jan22.112514.1750@ittpub>
  5. From: wil@ittpub.nl (Wil Evers)
  6. Date: 22 Jan 96 11:25:14 WET
  7. References: <4dnvnl$o0s@mis.cpc.ku.ac.th>
  8. Distribution: world
  9. Nntp-Posting-Host: lintilla
  10.  
  11. In article <4dnvnl$o0s@mis.cpc.ku.ac.th> b37ans@cc2.cpe.ku.ac.th (Anon  
  12. Sricharoenchai Mr. (37056140)) writes:
  13.  
  14. > Why does Borland C++ can't compile the function with 'for, while, goto'
  15. > statement to be "inline"? I think the compiler should can do it, because 
  16. > it's possible to do. 
  17.  
  18. Sure it's possible, but that doesn't mean the compiler has to. The  
  19. `inline' atttribute, like `register', is only a hint to the compiler: it  
  20. is up to the compiler to decide whether the function will actually be  
  21. inline expanded. Many compilers will silently decide not to do so, but the  
  22. Borland compiler nicely warns us about this.
  23.  
  24. - Wil
  25.